<!---
	Copyright 2010 Edward Trudeau, Jeremy Battle
    This software is freely available under the MIT License: http://www.opensource.org/licenses/mit-license.php
    http://ayc.googlecode.com
    
--->

component persistent="true" table="students" extends="wtf.aycBase" schema="dbo" output="false"
{
	/* properties */
	
	property name="studentid" column="id" type="numeric" ormtype="int" fieldtype="id"; 
	property name="cuaid" column="cuaid" type="int" ormtype="int"; 
	property name="title" column="title" type="string" ormtype="string"; 
	property name="firstName" column="firstName" type="string" ormtype="string"; 
	property name="middleInitial" column="middleInitial" type="string" ormtype="string"; 
	property name="lastName" column="lastName" type="string" ormtype="string"; 
	property name="dateOfBirth" column="dateOfBirth" type="date" ormtype="timestamp"; 
	property name="address1" column="address1" type="string" ormtype="string"; 
	property name="address2" column="address2" type="string" ormtype="string"; 
	property name="city" column="city" type="string" ormtype="string"; 
	property name="state" column="state" type="string" ormtype="string"; 
	property name="zipCode" column="zipCode" type="string" ormtype="string"; 
	property name="phone" column="phone" type="string" ormtype="string" ; 
	property name="hipaaRequirementMet" column="hipaaRequirementMet" type="numeric" ormtype="boolean"; 
	property name="newHire" column="newHire" type="numeric" ormtype="boolean"; 
	property name="email" column="email" type="string" ormtype="string"; 
	property name="hideEmail" column="hideEmail" type="numeric" ormtype="boolean"; 
	property name="studentInstance" type="array" fieldtype="one-to-many" inverse="true" cfc="studentInstance" fkcolumn="studentid";
	
	public string function getDisplayColumns(){
		var displayColumns = "studentid,cuaid,title,firstName,middleInitial,lastName,dateOfBirth,hipaaRequirementMet,email";
		return displayColumns;
	}
	
	public string function hasMany(){
		return "studentInstance";
	}
} 


